home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue25 / speed / UnitStoredProcedure.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-05-17  |  634 b   |  39 lines

  1. unit UnitStoredProcedure;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   DB, DBTables;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     procedure FormCreate(Sender: TObject);
  12.   private
  13.     { Private declarations }
  14.   public
  15.     { Public declarations }
  16.   end;
  17.  
  18. var
  19.   Form1: TForm1;
  20.  
  21. implementation
  22.  
  23. {$R *.DFM}
  24.  
  25. procedure TForm1.FormCreate(Sender: TObject);
  26. begin
  27. {
  28. BEGIN
  29.  SELECT SUM(budget), AVG(budget), MIN(budget), MAX(budget)
  30.   FROM department
  31.   WHERE head_dept = :head_dept
  32.   INTO :tot_budget, :avg_budget, :min_budget, :max_budget;
  33.  SUSPEND;
  34. END
  35. }
  36. end;
  37.  
  38. end.
  39.